active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
LEQ(ok(X1), ok(X2)) → LEQ(X1, X2)
ACTIVE(leq(X1, X2)) → ACTIVE(X1)
PROPER(if(X1, X2, X3)) → PROPER(X1)
ACTIVE(diff(X, Y)) → P(X)
LEQ(X1, mark(X2)) → LEQ(X1, X2)
ACTIVE(leq(X1, X2)) → LEQ(active(X1), X2)
PROPER(leq(X1, X2)) → PROPER(X1)
IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
ACTIVE(if(X1, X2, X3)) → IF(active(X1), X2, X3)
ACTIVE(diff(X, Y)) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
ACTIVE(p(X)) → P(active(X))
PROPER(s(X)) → S(proper(X))
P(ok(X)) → P(X)
ACTIVE(diff(X, Y)) → S(diff(p(X), Y))
ACTIVE(diff(X1, X2)) → DIFF(active(X1), X2)
ACTIVE(s(X)) → ACTIVE(X)
DIFF(ok(X1), ok(X2)) → DIFF(X1, X2)
ACTIVE(diff(X1, X2)) → ACTIVE(X2)
PROPER(leq(X1, X2)) → LEQ(proper(X1), proper(X2))
ACTIVE(p(X)) → ACTIVE(X)
S(ok(X)) → S(X)
ACTIVE(leq(X1, X2)) → LEQ(X1, active(X2))
PROPER(p(X)) → PROPER(X)
TOP(mark(X)) → PROPER(X)
P(mark(X)) → P(X)
ACTIVE(diff(X1, X2)) → ACTIVE(X1)
ACTIVE(diff(X, Y)) → LEQ(X, Y)
PROPER(leq(X1, X2)) → PROPER(X2)
LEQ(mark(X1), X2) → LEQ(X1, X2)
TOP(ok(X)) → ACTIVE(X)
PROPER(s(X)) → PROPER(X)
PROPER(if(X1, X2, X3)) → IF(proper(X1), proper(X2), proper(X3))
PROPER(if(X1, X2, X3)) → PROPER(X3)
DIFF(mark(X1), X2) → DIFF(X1, X2)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(diff(X, Y)) → DIFF(p(X), Y)
PROPER(diff(X1, X2)) → DIFF(proper(X1), proper(X2))
TOP(ok(X)) → TOP(active(X))
S(mark(X)) → S(X)
PROPER(diff(X1, X2)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X2)
ACTIVE(leq(s(X), s(Y))) → LEQ(X, Y)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
DIFF(X1, mark(X2)) → DIFF(X1, X2)
PROPER(p(X)) → P(proper(X))
ACTIVE(diff(X1, X2)) → DIFF(X1, active(X2))
PROPER(diff(X1, X2)) → PROPER(X1)
ACTIVE(leq(X1, X2)) → ACTIVE(X2)
TOP(mark(X)) → TOP(proper(X))
ACTIVE(s(X)) → S(active(X))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
LEQ(ok(X1), ok(X2)) → LEQ(X1, X2)
ACTIVE(leq(X1, X2)) → ACTIVE(X1)
PROPER(if(X1, X2, X3)) → PROPER(X1)
ACTIVE(diff(X, Y)) → P(X)
LEQ(X1, mark(X2)) → LEQ(X1, X2)
ACTIVE(leq(X1, X2)) → LEQ(active(X1), X2)
PROPER(leq(X1, X2)) → PROPER(X1)
IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
ACTIVE(if(X1, X2, X3)) → IF(active(X1), X2, X3)
ACTIVE(diff(X, Y)) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
ACTIVE(p(X)) → P(active(X))
PROPER(s(X)) → S(proper(X))
P(ok(X)) → P(X)
ACTIVE(diff(X, Y)) → S(diff(p(X), Y))
ACTIVE(diff(X1, X2)) → DIFF(active(X1), X2)
ACTIVE(s(X)) → ACTIVE(X)
DIFF(ok(X1), ok(X2)) → DIFF(X1, X2)
ACTIVE(diff(X1, X2)) → ACTIVE(X2)
PROPER(leq(X1, X2)) → LEQ(proper(X1), proper(X2))
ACTIVE(p(X)) → ACTIVE(X)
S(ok(X)) → S(X)
ACTIVE(leq(X1, X2)) → LEQ(X1, active(X2))
PROPER(p(X)) → PROPER(X)
TOP(mark(X)) → PROPER(X)
P(mark(X)) → P(X)
ACTIVE(diff(X1, X2)) → ACTIVE(X1)
ACTIVE(diff(X, Y)) → LEQ(X, Y)
PROPER(leq(X1, X2)) → PROPER(X2)
LEQ(mark(X1), X2) → LEQ(X1, X2)
TOP(ok(X)) → ACTIVE(X)
PROPER(s(X)) → PROPER(X)
PROPER(if(X1, X2, X3)) → IF(proper(X1), proper(X2), proper(X3))
PROPER(if(X1, X2, X3)) → PROPER(X3)
DIFF(mark(X1), X2) → DIFF(X1, X2)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(diff(X, Y)) → DIFF(p(X), Y)
PROPER(diff(X1, X2)) → DIFF(proper(X1), proper(X2))
TOP(ok(X)) → TOP(active(X))
S(mark(X)) → S(X)
PROPER(diff(X1, X2)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X2)
ACTIVE(leq(s(X), s(Y))) → LEQ(X, Y)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
DIFF(X1, mark(X2)) → DIFF(X1, X2)
PROPER(p(X)) → P(proper(X))
ACTIVE(diff(X1, X2)) → DIFF(X1, active(X2))
PROPER(diff(X1, X2)) → PROPER(X1)
ACTIVE(leq(X1, X2)) → ACTIVE(X2)
TOP(mark(X)) → TOP(proper(X))
ACTIVE(s(X)) → S(active(X))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
DIFF(X1, mark(X2)) → DIFF(X1, X2)
DIFF(ok(X1), ok(X2)) → DIFF(X1, X2)
DIFF(mark(X1), X2) → DIFF(X1, X2)
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
DIFF(X1, mark(X2)) → DIFF(X1, X2)
DIFF(ok(X1), ok(X2)) → DIFF(X1, X2)
DIFF(mark(X1), X2) → DIFF(X1, X2)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
IF(ok(X1), ok(X2), ok(X3)) → IF(X1, X2, X3)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
LEQ(ok(X1), ok(X2)) → LEQ(X1, X2)
LEQ(X1, mark(X2)) → LEQ(X1, X2)
LEQ(mark(X1), X2) → LEQ(X1, X2)
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
LEQ(ok(X1), ok(X2)) → LEQ(X1, X2)
LEQ(X1, mark(X2)) → LEQ(X1, X2)
LEQ(mark(X1), X2) → LEQ(X1, X2)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
S(ok(X)) → S(X)
S(mark(X)) → S(X)
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
S(ok(X)) → S(X)
S(mark(X)) → S(X)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
P(mark(X)) → P(X)
P(ok(X)) → P(X)
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
P(mark(X)) → P(X)
P(ok(X)) → P(X)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
PROPER(diff(X1, X2)) → PROPER(X2)
PROPER(p(X)) → PROPER(X)
PROPER(if(X1, X2, X3)) → PROPER(X2)
PROPER(s(X)) → PROPER(X)
PROPER(if(X1, X2, X3)) → PROPER(X3)
PROPER(diff(X1, X2)) → PROPER(X1)
PROPER(leq(X1, X2)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X1)
PROPER(leq(X1, X2)) → PROPER(X1)
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
PROPER(diff(X1, X2)) → PROPER(X2)
PROPER(p(X)) → PROPER(X)
PROPER(s(X)) → PROPER(X)
PROPER(if(X1, X2, X3)) → PROPER(X2)
PROPER(if(X1, X2, X3)) → PROPER(X3)
PROPER(diff(X1, X2)) → PROPER(X1)
PROPER(leq(X1, X2)) → PROPER(X2)
PROPER(leq(X1, X2)) → PROPER(X1)
PROPER(if(X1, X2, X3)) → PROPER(X1)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(diff(X1, X2)) → ACTIVE(X1)
ACTIVE(diff(X1, X2)) → ACTIVE(X2)
ACTIVE(leq(X1, X2)) → ACTIVE(X2)
ACTIVE(leq(X1, X2)) → ACTIVE(X1)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(p(X)) → ACTIVE(X)
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(diff(X1, X2)) → ACTIVE(X1)
ACTIVE(leq(X1, X2)) → ACTIVE(X1)
ACTIVE(leq(X1, X2)) → ACTIVE(X2)
ACTIVE(diff(X1, X2)) → ACTIVE(X2)
ACTIVE(if(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(p(X)) → ACTIVE(X)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesReductionPairsProof
TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
p(mark(X)) → mark(p(X))
s(mark(X)) → mark(s(X))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
p(ok(X)) → ok(p(X))
s(ok(X)) → ok(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
POL(0) = 0
POL(TOP(x1)) = 2·x1
POL(active(x1)) = 2·x1
POL(diff(x1, x2)) = 2·x1 + x2
POL(false) = 0
POL(if(x1, x2, x3)) = x1 + 2·x2 + x3
POL(leq(x1, x2)) = x1 + x2
POL(mark(x1)) = x1
POL(ok(x1)) = 2·x1
POL(p(x1)) = x1
POL(proper(x1)) = x1
POL(s(x1)) = x1
POL(true) = 0
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ Narrowing
TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
p(mark(X)) → mark(p(X))
p(ok(X)) → ok(p(X))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(true)) → TOP(ok(true))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(mark(0)) → TOP(ok(0))
TOP(mark(false)) → TOP(ok(false))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(true)) → TOP(ok(true))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(false)) → TOP(ok(false))
TOP(mark(0)) → TOP(ok(0))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(ok(X)) → TOP(active(X))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
p(mark(X)) → mark(p(X))
p(ok(X)) → ok(p(X))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
TOP(ok(diff(x0, x1))) → TOP(diff(active(x0), x1))
TOP(ok(diff(x0, x1))) → TOP(diff(x0, active(x1)))
TOP(ok(p(s(x0)))) → TOP(mark(x0))
TOP(ok(leq(x0, x1))) → TOP(leq(active(x0), x1))
TOP(ok(if(x0, x1, x2))) → TOP(if(active(x0), x1, x2))
TOP(ok(if(false, x0, x1))) → TOP(mark(x1))
TOP(ok(leq(x0, x1))) → TOP(leq(x0, active(x1)))
TOP(ok(leq(0, x0))) → TOP(mark(true))
TOP(ok(leq(s(x0), 0))) → TOP(mark(false))
TOP(ok(leq(s(x0), s(x1)))) → TOP(mark(leq(x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(diff(x0, x1))) → TOP(mark(if(leq(x0, x1), 0, s(diff(p(x0), x1)))))
TOP(ok(if(true, x0, x1))) → TOP(mark(x0))
TOP(ok(p(x0))) → TOP(p(active(x0)))
TOP(ok(p(0))) → TOP(mark(0))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
TOP(ok(diff(x0, x1))) → TOP(diff(active(x0), x1))
TOP(ok(diff(x0, x1))) → TOP(diff(x0, active(x1)))
TOP(ok(p(s(x0)))) → TOP(mark(x0))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(leq(x0, x1))) → TOP(leq(active(x0), x1))
TOP(ok(if(x0, x1, x2))) → TOP(if(active(x0), x1, x2))
TOP(ok(leq(x0, x1))) → TOP(leq(x0, active(x1)))
TOP(ok(if(false, x0, x1))) → TOP(mark(x1))
TOP(ok(leq(0, x0))) → TOP(mark(true))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(false)) → TOP(ok(false))
TOP(mark(0)) → TOP(ok(0))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(ok(leq(s(x0), 0))) → TOP(mark(false))
TOP(ok(leq(s(x0), s(x1)))) → TOP(mark(leq(x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(diff(x0, x1))) → TOP(mark(if(leq(x0, x1), 0, s(diff(p(x0), x1)))))
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(ok(p(x0))) → TOP(p(active(x0)))
TOP(ok(if(true, x0, x1))) → TOP(mark(x0))
TOP(mark(true)) → TOP(ok(true))
TOP(ok(p(0))) → TOP(mark(0))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
p(mark(X)) → mark(p(X))
p(ok(X)) → ok(p(X))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
TOP(ok(diff(x0, x1))) → TOP(diff(active(x0), x1))
TOP(ok(diff(x0, x1))) → TOP(diff(x0, active(x1)))
TOP(ok(p(s(x0)))) → TOP(mark(x0))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(leq(x0, x1))) → TOP(leq(active(x0), x1))
TOP(ok(if(x0, x1, x2))) → TOP(if(active(x0), x1, x2))
TOP(ok(if(false, x0, x1))) → TOP(mark(x1))
TOP(ok(leq(x0, x1))) → TOP(leq(x0, active(x1)))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(ok(leq(s(x0), s(x1)))) → TOP(mark(leq(x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(diff(x0, x1))) → TOP(mark(if(leq(x0, x1), 0, s(diff(p(x0), x1)))))
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(ok(p(x0))) → TOP(p(active(x0)))
TOP(ok(if(true, x0, x1))) → TOP(mark(x0))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
p(mark(X)) → mark(p(X))
p(ok(X)) → ok(p(X))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
TOP(ok(p(s(x0)))) → TOP(mark(x0))
Used ordering: Polynomial interpretation [25]:
TOP(ok(diff(x0, x1))) → TOP(diff(active(x0), x1))
TOP(ok(diff(x0, x1))) → TOP(diff(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(leq(x0, x1))) → TOP(leq(active(x0), x1))
TOP(ok(if(x0, x1, x2))) → TOP(if(active(x0), x1, x2))
TOP(ok(if(false, x0, x1))) → TOP(mark(x1))
TOP(ok(leq(x0, x1))) → TOP(leq(x0, active(x1)))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(ok(leq(s(x0), s(x1)))) → TOP(mark(leq(x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(diff(x0, x1))) → TOP(mark(if(leq(x0, x1), 0, s(diff(p(x0), x1)))))
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(ok(p(x0))) → TOP(p(active(x0)))
TOP(ok(if(true, x0, x1))) → TOP(mark(x0))
POL(0) = 0
POL(TOP(x1)) = x1
POL(active(x1)) = x1
POL(diff(x1, x2)) = 0
POL(false) = 0
POL(if(x1, x2, x3)) = x2 + x3
POL(leq(x1, x2)) = 0
POL(mark(x1)) = x1
POL(ok(x1)) = x1
POL(p(x1)) = 1 + x1
POL(proper(x1)) = x1
POL(s(x1)) = x1
POL(true) = 0
p(mark(X)) → mark(p(X))
s(ok(X)) → ok(s(X))
proper(p(X)) → p(proper(X))
p(ok(X)) → ok(p(X))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(mark(X1), X2) → mark(leq(X1, X2))
s(mark(X)) → mark(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
active(diff(X1, X2)) → diff(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
diff(mark(X1), X2) → mark(diff(X1, X2))
active(diff(X1, X2)) → diff(X1, active(X2))
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ QDPOrderProof
TOP(ok(diff(x0, x1))) → TOP(diff(active(x0), x1))
TOP(ok(diff(x0, x1))) → TOP(diff(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(leq(x0, x1))) → TOP(leq(active(x0), x1))
TOP(ok(if(x0, x1, x2))) → TOP(if(active(x0), x1, x2))
TOP(ok(if(false, x0, x1))) → TOP(mark(x1))
TOP(ok(leq(x0, x1))) → TOP(leq(x0, active(x1)))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(ok(leq(s(x0), s(x1)))) → TOP(mark(leq(x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(diff(x0, x1))) → TOP(mark(if(leq(x0, x1), 0, s(diff(p(x0), x1)))))
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(ok(if(true, x0, x1))) → TOP(mark(x0))
TOP(ok(p(x0))) → TOP(p(active(x0)))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
p(mark(X)) → mark(p(X))
p(ok(X)) → ok(p(X))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
TOP(ok(diff(x0, x1))) → TOP(mark(if(leq(x0, x1), 0, s(diff(p(x0), x1)))))
Used ordering: Polynomial interpretation [25]:
TOP(ok(diff(x0, x1))) → TOP(diff(active(x0), x1))
TOP(ok(diff(x0, x1))) → TOP(diff(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(leq(x0, x1))) → TOP(leq(active(x0), x1))
TOP(ok(if(x0, x1, x2))) → TOP(if(active(x0), x1, x2))
TOP(ok(if(false, x0, x1))) → TOP(mark(x1))
TOP(ok(leq(x0, x1))) → TOP(leq(x0, active(x1)))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(ok(leq(s(x0), s(x1)))) → TOP(mark(leq(x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(ok(if(true, x0, x1))) → TOP(mark(x0))
TOP(ok(p(x0))) → TOP(p(active(x0)))
POL(0) = 0
POL(TOP(x1)) = x1
POL(active(x1)) = 0
POL(diff(x1, x2)) = 1
POL(false) = 0
POL(if(x1, x2, x3)) = x2 + x3
POL(leq(x1, x2)) = 0
POL(mark(x1)) = x1
POL(ok(x1)) = x1
POL(p(x1)) = 0
POL(proper(x1)) = x1
POL(s(x1)) = 0
POL(true) = 0
p(mark(X)) → mark(p(X))
s(ok(X)) → ok(s(X))
proper(p(X)) → p(proper(X))
p(ok(X)) → ok(p(X))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(mark(X1), X2) → mark(leq(X1, X2))
s(mark(X)) → mark(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ QDPOrderProof
TOP(ok(diff(x0, x1))) → TOP(diff(active(x0), x1))
TOP(ok(diff(x0, x1))) → TOP(diff(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(leq(x0, x1))) → TOP(leq(active(x0), x1))
TOP(ok(if(x0, x1, x2))) → TOP(if(active(x0), x1, x2))
TOP(ok(if(false, x0, x1))) → TOP(mark(x1))
TOP(ok(leq(x0, x1))) → TOP(leq(x0, active(x1)))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(ok(leq(s(x0), s(x1)))) → TOP(mark(leq(x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(ok(p(x0))) → TOP(p(active(x0)))
TOP(ok(if(true, x0, x1))) → TOP(mark(x0))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
p(mark(X)) → mark(p(X))
p(ok(X)) → ok(p(X))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
TOP(ok(if(false, x0, x1))) → TOP(mark(x1))
TOP(ok(if(true, x0, x1))) → TOP(mark(x0))
Used ordering: Polynomial interpretation [25]:
TOP(ok(diff(x0, x1))) → TOP(diff(active(x0), x1))
TOP(ok(diff(x0, x1))) → TOP(diff(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(leq(x0, x1))) → TOP(leq(active(x0), x1))
TOP(ok(if(x0, x1, x2))) → TOP(if(active(x0), x1, x2))
TOP(ok(leq(x0, x1))) → TOP(leq(x0, active(x1)))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(ok(leq(s(x0), s(x1)))) → TOP(mark(leq(x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(ok(p(x0))) → TOP(p(active(x0)))
POL(0) = 0
POL(TOP(x1)) = x1
POL(active(x1)) = 0
POL(diff(x1, x2)) = 0
POL(false) = 0
POL(if(x1, x2, x3)) = 1 + x2 + x3
POL(leq(x1, x2)) = 0
POL(mark(x1)) = x1
POL(ok(x1)) = x1
POL(p(x1)) = 0
POL(proper(x1)) = x1
POL(s(x1)) = 0
POL(true) = 0
p(mark(X)) → mark(p(X))
s(ok(X)) → ok(s(X))
proper(p(X)) → p(proper(X))
p(ok(X)) → ok(p(X))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(mark(X1), X2) → mark(leq(X1, X2))
s(mark(X)) → mark(s(X))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
diff(mark(X1), X2) → mark(diff(X1, X2))
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ QDPOrderProof
↳ QDP
TOP(ok(diff(x0, x1))) → TOP(diff(active(x0), x1))
TOP(ok(diff(x0, x1))) → TOP(diff(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(leq(x0, x1))) → TOP(leq(active(x0), x1))
TOP(ok(if(x0, x1, x2))) → TOP(if(active(x0), x1, x2))
TOP(ok(leq(x0, x1))) → TOP(leq(x0, active(x1)))
TOP(mark(diff(x0, x1))) → TOP(diff(proper(x0), proper(x1)))
TOP(mark(p(x0))) → TOP(p(proper(x0)))
TOP(ok(leq(s(x0), s(x1)))) → TOP(mark(leq(x0, x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(if(x0, x1, x2))) → TOP(if(proper(x0), proper(x1), proper(x2)))
TOP(mark(leq(x0, x1))) → TOP(leq(proper(x0), proper(x1)))
TOP(ok(p(x0))) → TOP(p(active(x0)))
active(p(0)) → mark(0)
active(p(s(X))) → mark(X)
active(leq(0, Y)) → mark(true)
active(leq(s(X), 0)) → mark(false)
active(leq(s(X), s(Y))) → mark(leq(X, Y))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(diff(X, Y)) → mark(if(leq(X, Y), 0, s(diff(p(X), Y))))
active(p(X)) → p(active(X))
active(s(X)) → s(active(X))
active(leq(X1, X2)) → leq(active(X1), X2)
active(leq(X1, X2)) → leq(X1, active(X2))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(diff(X1, X2)) → diff(active(X1), X2)
active(diff(X1, X2)) → diff(X1, active(X2))
diff(mark(X1), X2) → mark(diff(X1, X2))
diff(X1, mark(X2)) → mark(diff(X1, X2))
diff(ok(X1), ok(X2)) → ok(diff(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
leq(mark(X1), X2) → mark(leq(X1, X2))
leq(X1, mark(X2)) → mark(leq(X1, X2))
leq(ok(X1), ok(X2)) → ok(leq(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
p(mark(X)) → mark(p(X))
p(ok(X)) → ok(p(X))
proper(p(X)) → p(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(leq(X1, X2)) → leq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(diff(X1, X2)) → diff(proper(X1), proper(X2))